import { formatDistance as formatDistance2, ratePrice as ratePrice2 } from '@/utils/util'

/**
 * 评分
 * @param {*} grade 
 */
 export const formatGrade = (grade) => {
  grade = Number(grade)
  if (isNaN(grade) || grade <= 0) return '暂无评分'
  
  return grade.toFixed(1)
}

/**
 * 初始化距离单位
 */
export const formatDistance = formatDistance2

/**
 * 计算折扣价格
 */
export const ratePrice = ratePrice2